<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="WEB-INF/c.tld" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<html:html locale="true">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>Quiz HomePage</title>
		<link href="default.css" rel="stylesheet" type="text/css" />
	</head>

<body>
<div id="header">
	<div id="logo">
		<h1><a href="#">Administrador</a></h1>
	</div>
	<div id="menu">
		<ul>
			<li><a></a></li>
		</ul>
	</div>
</div>

<c:if test="${loggedUser != null}">

<html:form action="/admin" method="post">
<div id="content">
	<div id="sidebar">
		<div id="observers" class="boxed">
			<div class="title">
		  		<h2>Observadores</h2>
			</div>
			<div class="content">
				<fieldset>
				   <c:forEach items="${ListObservers}" var="observers" >
						<label for="inputtext1"><b><c:out value="${observers.login}"/></b></label>
						<br>
				   </c:forEach>		
				</fieldset>
			</div>
		</div>
		<!-- end #observers -->
	</div>
	<!-- end #sidebar -->
	
	<div id="main">
		<div id="add" class="boxed">
			<div class="title">
				<h2> Adicionar Observador</h2>
			</div>  			
	  		<div class="content">
				<fieldset>
					<label for="inputtext1">*Login:</label> 
					<html:text property="loginToAdd" />	
					<html:submit value="Adicionar Novo Observador"/> 
				</fieldset>
				
			</div>	
	  		<br/>
	  		<br/>
	  		</div>
		<div id="remove" class="boxed">
  			<div class="title">
  				<h2>Remover Observador</h2>
  			</div>
  			<div class="content">
				<fieldset>
					<label for="inputtext1">*Login:</label>
					<html:text property="loginToRemove" />
					<html:submit value="Remover Observador"/>  			
				</fieldset>
				
			</div>	
	  		
  			
		</div>
		<!-- end #add -->
	</div>
	<!-- end #main -->
	
	<div id="sidebar2">
		<div id="nonobservers" class="boxed">
			<div class="title">
		  		<h2>Não Observadores</h2>
			</div>
			<div class="content">
				<fieldset>
				   <c:forEach items="${ListNonObservers}" var="nonobservers" >
						<label for="inputtext1"><b><c:out value="${nonobservers.login}"/></b></label>
				   		<br>
				   </c:forEach>		
				</fieldset>
			</div>
		</div>
			
		<!-- end #nonobservers -->
	</div>
	<!-- end #sidebar2 -->
	
	<div style="clear: both;">&nbsp;</div>
	<a href="../<%=request.getContextPath()%>/index.jsp">Sign Out</a>	
</div>
</html:form>
<!-- end #sidebar2 -->&nbsp;
<div id="footer">
	<p id="legal">Copyright &copy; 2008. All Rights Reserved. Designed by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div>

</c:if>

<c:if test="${loggedUser == null}">
	<div align="center">
	<c:out value="Você precisa realizar seu login para visualizar esta página!"/>
	</div>
</c:if>

</body>
</html:html>